package com.cjw.mapper.livesquare;

import com.cjw.pojo.dto.livesquare.MyPlanDTO;
import com.cjw.pojo.entity.livesquare.Plan;
import com.cjw.pojo.entity.livesquare.UserPlan;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

/**
 * @author : cjw
 * @date: : 2022/2/12 12:20
 * @description : UserPlanMapper
 */
@Repository
public interface UserPlanMapper extends Mapper<UserPlan> {
    /**
     * 获取排行榜前几名的计划
     * @param number
     * @return
     */
    List<Long> getMaxNumberPlanId(Integer number);

    List<Plan> getPlanByTime(@Param("userId")Long userId,@Param("date") Date date);

    Integer getAllCountByTime(@Param("date") Date date);
}
